package com.huawei.appmarket.service.store.awk.card;

import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.huawei.appgallery.foundation.card.base.card.BaseDistCard;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appgallery.foundation.ui.framework.widget.button.DownloadButton;
import com.huawei.appmarket.service.store.awk.bean.SubstanceAppDlHeadCardBean;
import o.cgz;
import o.eqx;
import o.ewm.j;

public class SubstanceAppDlHeadCard extends BaseDistCard {
    private ImageView ʼ;
    private ImageView ˋ;
    private TextView ॱॱ;
    private TextView ᐝ;

    public SubstanceAppDlHeadCard(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        ˋ((DownloadButton) view.findViewById(j.ʹ));
        this.ˋ = (ImageView) view.findViewById(j.ꜞ);
        this.ॱॱ = (TextView) view.findViewById(j.ꞌ);
        this.ᐝ = (TextView) view.findViewById(j.ﾞ);
        this.ʼ = (ImageView) view.findViewById(j.ﹳ);
        ʽ(view);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (cardBean != null) {
            SubstanceAppDlHeadCardBean substanceAppDlHeadCardBean = (SubstanceAppDlHeadCardBean) cardBean;
            eqx.ˏ(this.ʼ, substanceAppDlHeadCardBean.ॱˌ(), "app_default_icon");
            if (TextUtils.isEmpty(substanceAppDlHeadCardBean.ʻˋ())) {
                this.ˋ.setVisibility(8);
            } else {
                this.ˋ.setVisibility(0);
                eqx.ˎ(this.ˋ, substanceAppDlHeadCardBean.ʻˋ());
            }
            if (substanceAppDlHeadCardBean.ٴ() != 0) {
                this.ᐝ.setText(substanceAppDlHeadCardBean.ߴ());
            } else {
                this.ᐝ.setText(substanceAppDlHeadCardBean.ʻˊ());
            }
            this.ॱॱ.setText(substanceAppDlHeadCardBean.ʼˊ());
        }
    }
}
